#ifndef __SERIAL3_H
#define __SERIAL3_H

#include <stdint.h>

#define SERIAL3_RX_BUFFER_SIZE 512

extern volatile uint8_t Serial3_RxBuffer[SERIAL3_RX_BUFFER_SIZE];
extern volatile uint16_t Serial3_RxIndex;
extern volatile uint8_t Serial3_RxFlag;

void Serial3_Init(uint32_t baudrate);
void Serial3_SendByte(uint8_t byte);
void Serial3_SendBuffer(uint8_t *buffer, uint16_t length);
void Serial3_SendArray(uint8_t *Array, uint16_t Length);
void Serial3_SendString(char *String);
uint16_t Serial3_GetRxData(uint8_t *buffer, uint16_t max_length);
uint8_t Serial3_DataAvailable(void);
void Serial3_ClearRxBuffer(void);
uint16_t Serial3_GetRxDataLength(void);

#endif /* __SERIAL3_H */
